function handles = deleteGroup(handles)
% deleteGroup
%
% Editing:
% gs may 2005
% -----------------------------------------------


% determine which group was selected
groupVal = get(handles.groupList, 'Value');

% delete from groups listbox
groups = get(handles.groupList, 'String');
numGroups = size(groups, 1);

groups(groupVal) = [];
set(handles.groupList, 'String', groups);
if groupVal == numGroups
    set(handles.groupList, 'Value', groupVal-1);
end

% delete from handles
handles.analysis.mapAverager.cellLists.currentFile.listsAndExpts(groupVal,:) = [];


handles = updateLists(handles);
handles = saveListFile(handles);
